
<div class="scrollbox">
  <table>
    <thead>
      <tr>
        <th class="curl-name">课程名称</th>
        <th class="curl-type">课程类型</th>
        <th class="curl-pos">导师</th>
        <th class="curl-dance">舞种</th>
        <th class="curl-stu">授课对象</th>
        <th class="curl-course">消费类型</th>
        <th class="curl-state">状态</th>
        <th class="curl-operation">操作</th>
      </tr>
    </thead>
    <tbody>
      <% @course_infos.each do |course_info| %>
        <tr>
          <td><%= course_info.name %></td>
          <td><%= course_info.course_type %></td>
          <td><%= course_info.teacher.name %></td>
          <td><%= course_info.dance_type %></td>
          <td><%= course_info.age_group %></td>
          <% if course_info.paying_ways.present? %>
            <td><%= course_info.paying_ways.size > 1 ? "#{course_info.paying_ways.first.pay_type} 等" : "#{course_info.paying_ways.first.pay_type}" %></td>
          <%else%>
            <td>-</td>
          <%end%>
          <td><%= course_info.status %></td>
          <td class="curl-operation">
            <span>[</span>
            <em><%= link_to "查看详情", admin_course_info_path(course_info) %></em>
            <span>]</span>
          </td>
        </tr>
      <%end%>
    </tbody>
  </table>
  <div class="apple_pagination">
    <%= paginate @course_infos, :container => false %>
  </div>
</div>
